package com.edu.study.base.lmsOrderItem.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.edu.study.base.lmsOrderItem.domain.LmsOrderItem;
import com.edu.study.base.lmsOrderItem.mapper.LmsOrderItemMapper;
import com.edu.study.base.lmsOrderItem.service.ILmsOrderItemService;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;

/**
 * LmsOrderItemService业务层处理
 * 
 * @author zw
 * @date 2021-08-11
 */
@Service
//@DataSource(value = DataSourceType.SLAVE)
public class LmsOrderItemServiceImpl implements ILmsOrderItemService 
{
    @Autowired
    private LmsOrderItemMapper lmsOrderItemMapper;

    /**
     * 查询LmsOrderItem
     * 
     * @param id LmsOrderItemID
     * @return LmsOrderItem
     */
    @Override
    public LmsOrderItem selectLmsOrderItemById(Long id)
    {
        return lmsOrderItemMapper.selectLmsOrderItemById(id);
    }

    /**
     * 查询LmsOrderItem列表
     * 
     * @param lmsOrderItem LmsOrderItem
     * @return LmsOrderItem
     */
    @Override
    public List<LmsOrderItem> selectLmsOrderItemList(LmsOrderItem lmsOrderItem)
    {
        return lmsOrderItemMapper.selectLmsOrderItemList(lmsOrderItem);
    }

    /**
     * 新增LmsOrderItem
     * 
     * @param lmsOrderItem LmsOrderItem
     * @return 结果
     */
    @Override
    public int insertLmsOrderItem(LmsOrderItem lmsOrderItem)
    {
        return lmsOrderItemMapper.insertLmsOrderItem(lmsOrderItem);
    }

    /**
     * 修改LmsOrderItem
     * 
     * @param lmsOrderItem LmsOrderItem
     * @return 结果
     */
    @Override
    public int updateLmsOrderItem(LmsOrderItem lmsOrderItem)
    {
        return lmsOrderItemMapper.updateLmsOrderItem(lmsOrderItem);
    }

    /**
     * 批量删除LmsOrderItem
     * 
     * @param ids 需要删除的LmsOrderItemID
     * @return 结果
     */
    @Override
    public int deleteLmsOrderItemByIds(Long[] ids)
    {
        return lmsOrderItemMapper.deleteLmsOrderItemByIds(ids);
    }

    /**
     * 删除LmsOrderItem信息
     * 
     * @param id LmsOrderItemID
     * @return 结果
     */
    @Override
    public int deleteLmsOrderItemById(Long id)
    {
        return lmsOrderItemMapper.deleteLmsOrderItemById(id);
    }

	@Override
	public List<LmsOrderItem>  selectLmsOrderItemByMemberId(String memberId, String productName) {
		return lmsOrderItemMapper.selectLmsOrderItemByMemberId(memberId, productName);
	}
}
